package com.he.observedmodel;

import com.he.observedmodel.observed.concreteobserved.Concreteobserved1;
import com.he.observedmodel.subject.concretesubject.Concretesubject;

public class Client {
    public static void main(String[] args) {
        Concretesubject<String> subject = new Concretesubject();
        subject.add(new Concreteobserved1("tom", "watch IQY", subject));
        subject.add(new Concreteobserved1("jam", "talk with other", subject));
        System.out.println(subject.getList());
        subject.updateState("老板来了,快坐好");
        subject.notifyOberved();
        System.out.println(subject.getList());

    }
}
